package com.miku.blog.mapper;

import com.miku.blog.domain.UserAuth;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author Miku
* @description 针对表【tb_user_auth】的数据库操作Mapper
* @createDate 2022-05-24 23:03:39
* @Entity com.miku.blog.domain.UserAuth
*/
public interface UserAuthMapper extends BaseMapper<UserAuth> {

    /**
     * 根据 角色ID 获取 用户列表
     * @param roleId
     * @return
     */
    public List<UserAuth> getUserAuthByRoleId(@Param("roleId") Integer roleId);

    public boolean addTBUserRoleByUserIdAndRoleId(@Param("userId") Integer userId,@Param("roleId") Integer roleId);

}




